package com.binest.projectInvestDetails.service.impl;

import java.util.List;
import com.binest.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.binest.projectInvestDetails.mapper.ProjectInvestDetailsMapper;
import com.binest.projectInvestDetails.domain.ProjectInvestDetails;
import com.binest.projectInvestDetails.service.IProjectInvestDetailsService;

/**
 * 项目投资机构详情Service业务层处理
 * 
 * @author wwd
 * @date 2024-01-24
 */
@Service
public class ProjectInvestDetailsServiceImpl implements IProjectInvestDetailsService 
{
    @Autowired
    private ProjectInvestDetailsMapper projectInvestDetailsMapper;

    /**
     * 查询项目投资机构详情
     * 
     * @param id 项目投资机构详情主键
     * @return 项目投资机构详情
     */
    @Override
    public ProjectInvestDetails selectProjectInvestDetailsById(String id)
    {
        return projectInvestDetailsMapper.selectProjectInvestDetailsById(id);
    }

    @Override
    public List<ProjectInvestDetails> selectProjectInvestDetailsListByInId(String inclousionId) {
        return projectInvestDetailsMapper.selectProjectInvestDetailsListByInId(inclousionId);
    }

    /**
     * 查询项目投资机构详情列表
     * 
     * @param projectInvestDetails 项目投资机构详情
     * @return 项目投资机构详情
     */
    @Override
    public List<ProjectInvestDetails> selectProjectInvestDetailsList(ProjectInvestDetails projectInvestDetails)
    {
        return projectInvestDetailsMapper.selectProjectInvestDetailsList(projectInvestDetails);
    }

    /**
     * 新增项目投资机构详情
     * 
     * @param projectInvestDetails 项目投资机构详情
     * @return 结果
     */
    @Override
    public int insertProjectInvestDetails(ProjectInvestDetails projectInvestDetails)
    {
        projectInvestDetails.setCreateTime(DateUtils.getNowDate());
        return projectInvestDetailsMapper.insertProjectInvestDetails(projectInvestDetails);
    }

    /**
     * 修改项目投资机构详情
     * 
     * @param projectInvestDetails 项目投资机构详情
     * @return 结果
     */
    @Override
    public int updateProjectInvestDetails(ProjectInvestDetails projectInvestDetails)
    {
        projectInvestDetails.setUpdateTime(DateUtils.getNowDate());
        return projectInvestDetailsMapper.updateProjectInvestDetails(projectInvestDetails);
    }

    /**
     * 批量删除项目投资机构详情
     * 
     * @param ids 需要删除的项目投资机构详情主键
     * @return 结果
     */
    @Override
    public int deleteProjectInvestDetailsByIds(String[] ids)
    {
        return projectInvestDetailsMapper.deleteProjectInvestDetailsByIds(ids);
    }

    /**
     * 删除项目投资机构详情信息
     * 
     * @param id 项目投资机构详情主键
     * @return 结果
     */
    @Override
    public int deleteProjectInvestDetailsById(String id)
    {
        return projectInvestDetailsMapper.deleteProjectInvestDetailsById(id);
    }
}
